package com.zhaokuner.springcloudconfigserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;

/**
 * @author 赵希坤
 */
@SpringBootApplication
@EnableConfigServer
public class SpringCloudConfigServerApplication {

    public static void main(String[] args) {
        String logPath = "log.path.prefix";

        //如果启动参数没设置日志的保存路径，则目录用logs
        if (null == System.getProperty(logPath) || System.getProperty(logPath).length() != 0) {
            System.setProperty(logPath, ".");
        }

        // 异步打印
        System.setProperty("Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");
        SpringApplication.run(SpringCloudConfigServerApplication.class, args);
        System.out.println("");
        String fozu =
                "                   _ooOoo_" + "\n" +
                        "                  o8888888o" + "\n" +
                        "                  88\" . \"88" + "\n" +
                        "                  (| -_- |)" + "\n" +
                        "                  O\\  =  /O" + "\n" +
                        "               ____/`---'\\____" + "\n" +
                        "             .'  \\\\|     |//  `." + "\n" +
                        "            /  \\\\|||  :  |||//  \\" + "\n" +
                        "           /  _||||| -:- |||||-  \\" + "\n" +
                        "           |   | \\\\\\  -  /// |   |" + "\n" +
                        "           | \\_|  ''\\---/''  |   |" + "\n" +
                        "           \\  .-\\__  `-`  ___/-. /" + "\n" +
                        "         ___`. .'  /--.--\\  `. . __" + "\n" +
                        "      .\"\" '<  `.___\\_<|>_/___.'  >'\"\"." + "\n" +
                        "     | | :  `- \\`.;`\\ _ /`;.`/ - ` : | |" + "\n" +
                        "     \\  \\ `-.   \\_ __\\ /__ _/   .-` /  /" + "\n" +
                        "======`-.____`-.___\\_____/___.-`____.-'======" + "\n" +
                        "                   `=---='" + "\n" +
                        "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + "\n" +
                        "\t佛祖保佑       永无BUG" + "\n" +
                        "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" + "\n" ;
        System.out.println(fozu);
    }

}
